/* 全局样式和变量 */
:root {
    --docker-blue: #2496ed;
    --docker-blue-dark: #0d6da3;
    --background-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --content-bg: #ffffff;
    --text-color: #343a40;
    --heading-color: #0b2642;
    --border-color: #e9ecef;
    --code-bg: #f1f3f5;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-family: 'Noto Sans SC', sans-serif;
}

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}

/* 容器布局 */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

/* 侧边栏导航 */
.sidebar {
    position: sticky;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    color: var(--heading-color);
    font-size: 20px;
}

.sidebar nav ul {
    list-style: none;
    padding: 16px 0;
}

.sidebar nav a {
    display: block;
    padding: 12px 24px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background-color: var(--background-color);
    color: var(--docker-blue);
}

.sidebar nav a.active {
    color: var(--docker-blue);
    font-weight: 500;
    background-color: #e7f5ff;
    border-left-color: var(--docker-blue);
}

/* 主要内容区域 */
.content {
    flex-grow: 1;
    padding: 48px;
    background-color: var(--content-bg);
}

.content header {
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.content h1 {
    font-size: 36px;
    color: var(--heading-color);
    margin-bottom: 16px;
    line-height: 1.3;
}

.content section {
    margin-bottom: 48px;
    padding-top: 24px; /* for scroll-margin */
}

.content h2 {
    font-size: 28px;
    color: var(--heading-color);
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.content h3 {
    font-size: 22px;
    color: var(--heading-color);
    margin-top: 32px;
    margin-bottom: 16px;
}

.content p, .content ul {
    margin-bottom: 16px;
}

/* 代码块样式 */
.code-block {
    position: relative;
    background-color: var(--code-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #fff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background-color: var(--background-color);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* 其他组件样式 */
.button {
    display: inline-block;
    background-color: var(--docker-blue);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.button:hover {
    background-color: var(--docker-blue-dark);
}

.highlight-box, .solution-box {
    background-color: #e7f5ff;
    border: 1px solid #bde0fe;
    border-left: 5px solid var(--docker-blue);
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
}

.highlight-box ul {
    padding-left: 20px;
    list-style: none;
}
.highlight-box ul li {
    margin-bottom: 8px;
}

.emoji {
    margin-right: 10px;
}

.solution-box {
    background-color: #fffbe6;
    border-color: #ffe58f;
    border-left-color: #faad14;
}

.tech-note-box {
    background-color: #f8f0ff;
    border: 1px solid #e0cffc;
    border-left: 5px solid #9370db;
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
}

.tech-note-box h4 {
    color: #5a4a7b;
    margin-bottom: 10px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--heading-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .content {
        padding: 24px;
    }
} 